Integrand size = 27, antiderivative size = 94 \[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=-\frac {\cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+m,\frac {3}{2},-\frac {2 (1-\sin (e+f x))}{1+\sin (e+f x)}\right ) (3-\sin (e+f x))^{-1-m} \left (\frac {3-\sin (e+f x)}{1+\sin (e+f x)}\right )^{1+m} (1+\sin (e+f x))^m}{f} \]
[Out]
Time = 0.07 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2867, 134} \[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=-\frac {\cos (e+f x) (3-\sin (e+f x))^{-m-1} \left (\frac {3-\sin (e+f x)}{\sin (e+f x)+1}\right )^{m+1} (\sin (e+f x)+1)^m \operatorname {Hypergeometric2F1}\left (\frac {1}{2},m+1,\frac {3}{2},-\frac {2 (1-\sin (e+f x))}{\sin (e+f x)+1}\right )}{f} \]
[In]
[Out]
Rule 134
Rule 2867
Rubi steps \begin{align*} \text {integral}& = \frac {\cos (e+f x) \text {Subst}\left (\int \frac {(3-x)^{-1-m} (1+x)^{-\frac {1}{2}+m}}{\sqrt {1-x}} \, dx,x,\sin (e+f x)\right )}{f \sqrt {1-\sin (e+f x)} \sqrt {1+\sin (e+f x)}} \\ & = -\frac {\cos (e+f x) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},1+m,\frac {3}{2},-\frac {2 (1-\sin (e+f x))}{1+\sin (e+f x)}\right ) (3-\sin (e+f x))^{-1-m} \left (\frac {3-\sin (e+f x)}{1+\sin (e+f x)}\right )^{1+m} (1+\sin (e+f x))^m}{f} \\ \end{align*}
Result contains complex when optimal does not.
Time = 10.50 (sec) , antiderivative size = 276, normalized size of antiderivative = 2.94 \[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=-\frac {\operatorname {Hypergeometric2F1}\left (1+m,1+2 m,2 (1+m),\frac {2 \sqrt {2} (1-i \cos (e+f x)+\sin (e+f x))}{\left (2+\sqrt {2}\right ) \left (-3+2 \sqrt {2}-i \cos (e+f x)+\sin (e+f x)\right )}\right ) (3-\sin (e+f x))^{-1-m} \left (3+2 \sqrt {2}+i \cos (e+f x)-\sin (e+f x)\right ) (1+\sin (e+f x))^m \left (\frac {\left (-2+\sqrt {2}\right ) \left (3+2 \sqrt {2}+i \cos (e+f x)-\sin (e+f x)\right )}{-3+2 \sqrt {2}-i \cos (e+f x)+\sin (e+f x)}\right )^m (i \cos (e+f x)+\sin (e+f x)) (\cos (e+f x)+i (1+\sin (e+f x))) \left (\cosh \left (m \log \left (2+\sqrt {2}\right )\right )-\sinh \left (m \log \left (2+\sqrt {2}\right )\right )\right )}{2 \left (2+\sqrt {2}\right ) f (1+2 m)} \]
[In]
[Out]
\[\int \left (3-\sin \left (f x +e \right )\right )^{-1-m} \left (\sin \left (f x +e \right )+1\right )^{m}d x\]
[In]
[Out]
\[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int { {\left (\sin \left (f x + e\right ) + 1\right )}^{m} {\left (-\sin \left (f x + e\right ) + 3\right )}^{-m - 1} \,d x } \]
[In]
[Out]
\[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int \left (3 - \sin {\left (e + f x \right )}\right )^{- m - 1} \left (\sin {\left (e + f x \right )} + 1\right )^{m}\, dx \]
[In]
[Out]
\[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int { {\left (\sin \left (f x + e\right ) + 1\right )}^{m} {\left (-\sin \left (f x + e\right ) + 3\right )}^{-m - 1} \,d x } \]
[In]
[Out]
\[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int { {\left (\sin \left (f x + e\right ) + 1\right )}^{m} {\left (-\sin \left (f x + e\right ) + 3\right )}^{-m - 1} \,d x } \]
[In]
[Out]
Timed out. \[ \int (3-\sin (e+f x))^{-1-m} (1+\sin (e+f x))^m \, dx=\int \frac {{\left (\sin \left (e+f\,x\right )+1\right )}^m}{{\left (3-\sin \left (e+f\,x\right )\right )}^{m+1}} \,d x \]
[In]
[Out]